//
//  SearchQuestionCell.m
//  MyProject
//
//  Created by 石小强 on 2018/4/18.
//  Copyright © 2018年 yanjiaming. All rights reserved.
//

#import "SearchQuestionCell.h"

@implementation SearchQuestionCell

- (void)setModel:(QuestionModel *)model {
    _model = model;
    
    self.contentL.text = model.content;
    self.tagL.text = [NSString stringWithFormat:@"#%@#", model.relatedTag];
    
    CGSize contentS = [Tool sizeWithText:model.content font:[UIFont fontWithName:@"PingFang SC" size:14]];
    if (contentS.width > kScreenWidth - 60) {
        self.contentL.numberOfLines = 2;
        self.contentViewHeight.constant = 53 + 36;
    } else {
        self.contentL.numberOfLines = 1;
        self.contentViewHeight.constant = 53 + 20;
    }
}

@end
